import javax.swing.*;
import java.awt.event.*;
import java.awt.*;




class GestionEvtFenetrePrinc extends WindowAdapter {
    public void windowClosing(WindowEvent e)
    {
        Window win = e.getWindow();
        win.setVisible(false);
        System.exit(0);
    }
}



public class FenetrePrincipale extends JFrame {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public FenetrePrincipale(String nomFenetre){
 		super(nomFenetre);
		addWindowListener(new GestionEvtFenetrePrinc());
	}
	
	public void ajoute(Component c) {
		getContentPane().add(c,"Center");
	}
	
	
}	